1. Field of the Invention
The invention relates to user interfaces and more particularly relates to display of text from legacy applications written for unidirectional text in bi-directional text environments.
2. Description of the Related Art
Handling bi-directional text presents challenges to designers of user interfaces. In one example, the bi-directional text may include both native text which is read right-to-left and foreign text which is read left-to-right. Thus, the bi-directional text cannot be simply printed or displayed one character after another. Unidirectional text, in contrast, is text which is all left-to-right (or right-to-left) text. With bi-directional text, native text, such as Hebrew or Arabic, should be displayed in a right-to-left order, while the foreign text, such as English, should be displayed in a left-to-right order. An example would be an article reported in Arabic or Hebrew that contains quotes or terms of art in English that are not translated. In such an article, the main text of the article, the Arabic or Hebrew text, is read right-to-left, but the untranslated English portions are read left-to-right. While this is conceptually simple for the reader, laying out this text may prove difficult.
In particular, if the text is stored in the order in which it is to be displayed or printed, then manipulation of the text may prove complex because of the embedded portions of the text which are oriented backwards relative to the rest of the text. Moreover, on mobile computing devices, bi-directional text may be important when the device is in an area where such text is utilized, but unidirectional text may be important when the device is in an area where text only flows in one direction.
Typically, software is written to either handle right-to-left or left-to-right style text, not both. Moreover, most software is developed in locations where people read left-to-right, so compatibility for right-to-left or bi-directional text is not considered. Typically, text is stored as a string of characters in memory as the characters would be printed in a left-to-right fashion. Thus, it is potentially valuable to create software which may be used to adapt software written solely for left-to-right text for use in a bi-directional text environment. A bi-directional text environment may be defined as either an area where bi-directional text is utilized, or a device in which support for bi-directional text is part of the functionality of the device or its software.